from vquant.store import Store


class Snapshot(Store):
    columns =['datetime', 'value']

    def daily(self):
        dataframe = self.query()
        dataframe.set_index(dataframe['datetime'], inplace=True)
        return dataframe.resample('D').agg(
            dict(datetime='first', value='last')
        ).dropna()


__all__ = [Snapshot]
